package com.wicket.okrapp.integration.dto;

import com.wicket.okrapp.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;
import javax.validation.constraints.NotNull;
import lombok.Data;

/**
 * @desc QuestionDto
 * @使用场景
 */
@Data
public class QuestionDto extends BaseDto implements Serializable {

  /**
   * 问题ID
   */
  @ApiModelProperty("问题ID")
  private String questionId;

  /**
   * 问题文字简介
   */
  @ApiModelProperty("问题文字简介")
  private String questionIntroduce;

  /**
   * 问题等级
   */
  @ApiModelProperty("问题等级")
  private String questionLevel;

  /**
   * 问题状态 QUESTIONABILITY:待解决 RESOLVED:已解决 REJECTED:已拒绝 SUSPENDED:已挂起 CLOSED:已关闭
   */
  @ApiModelProperty("问题状态")
  private String questionStatus;

  /**
   * 是否私密 TRUE:是 FALSE:否
   */
  @ApiModelProperty("是否私密")
  private String isPrivate;

  /**
   * 实际解决时间
   */
  @ApiModelProperty("实际解决时间")
  private Date actualSolveTime;

  /**
   * 实际解决天数
   */
  @ApiModelProperty("实际解决天数")
  private Long actualSolveCycle;

  /**
   * 冗余来源类型编码
   */
  @ApiModelProperty("冗余来源类型编码")
  private String sourceTypeCode;

  /**
   * 内容表类型编码 OMS_TARGET_CYCLE:目标周期表 OMS_EVALUATION_OBJECT_TARGET_CYCLE:被评对象目标周期表 OMS_TARGET:目标表 OMS_TARGET_CATEGORY:目标分类表 OMS_TARGET_OBJECTIVE:指标表 OMS_TASK:任务表 OMS_ORG_INDUCTION_RECORD:就职记录表 OMS_FRAMEWORK_ORIGINAL_ROLE_MEMBER:身份人员表 OMS_ORG_DEPT:部门表 OMS_BASE_HOST:宿主表 OMS_FRAMEWORK_SPACE:空间表 OMS_TSPE_CYCLE_STAGE_DATA:周期阶段资料记录 OMS_EVALUATION_TEMPLATE:评价模板 OMS_EVALUATION_PORTRAIT:评价画像表 OMS_ORG_POSITION:职务表 OMS_VIRTUAL_ORG_MEMBER:虚拟组织成员表 OMS_PLANNING:规划资料表 OMS_FRAMEWORK_USERS:个人账号表 OMS_EXECUTE_CYCLE_STAGE:执行周期阶段表 OMS_CONF_SCHEME:配置方案表 OMS_EVA_OBJ_TARGET_CYCLE_OSET:被评对象目标周期目标设置表 OMS_EVA_OBJ_TARGET_CYCLE_WEIGHT_SET:被评对象目标周期权重设置表 OMS_NOTICE:通知公告表 OMS_CYCLE:周期表 OMS_EVALUATION_SUBJECT:评价主题表 OMS_BIZ_APP_BATCH:业务应用批次表 OMS_EVA_BATCH_RELATED_SET:评价模板批次相关设置表 OMS_TARGET_CYCLE_PLAN_SET:目标周期规划设置表 OMS_TARGET_OBJECTIVE_PLAN_EXTEND:指标扩展规划设置表 OMS_MESSAGE_CHANNEL:通道表 OMS_ORG_ORGANIZATION:组织表 OMS_PROJECT:项目表 OMS_ORG_DEPT:部门表 OMS_QUESTION:问题表
   */
  @ApiModelProperty("内容表类型编码")
  private String tableTypeCode;

  /**
   * 内容表主键ID
   */
  @ApiModelProperty("内容表主键ID")
  private String entityId;

  /**
   * 归属对象类型编码
   */
  @ApiModelProperty("归属对象类型编码")
  private String coordObjectTypeCode;

  /**
   * 归属对象ID
   */
  @ApiModelProperty("归属对象ID")
  private String coordObjectId;

  /**
   * 主体生命周期 CURRENTLY_VALID:当前有效 EDITING:正在编辑 ARCHIVING:历史存档
   */
  @ApiModelProperty("主体生命周期")
  private String subjectLifeCycle;

  /**
   * 发起人就职记录ID
   */
  @ApiModelProperty("发起人就职记录ID")
  private String initiatorInductionRecordId;

  /**
   * 发起人真实姓名
   */
  @ApiModelProperty("发起人真实姓名")
  private String initiatorIdCardName;

  /**
   * 发起人昵称
   */
  @ApiModelProperty("发起人昵称")
  private String initiatorNickName;

  /**
   * 负责人就职记录ID
   */
  @ApiModelProperty("负责人就职记录ID")
  private String responsibleInductionRecordId;

  /**
   * 相关人数量
   */
  @ApiModelProperty("相关人数量")
  private Long relevantPeopleNum;

  /**
   * 归属主体排序
   */
  @ApiModelProperty("归属主体排序")
  private Long orderNumber;

  /**
   * 操作时间
   */
  @ApiModelProperty("操作时间")
  private Date operateTime;

  /**
   * 创建时间
   */
  @ApiModelProperty("创建时间")
  private Date createTime;

  /**
   * 问题编号
   */
  @NotNull(message = "问题编号不能为空")
  @ApiModelProperty("问题编号")
  private String taskNumber;

  /**
   * 创建人就职记录ID
   */
  @NotNull(message = "创建人就职记录ID不能为空")
  @ApiModelProperty("创建人就职记录ID")
  private String createInductionId;

  /**
   * 问题编号
   */
  @ApiModelProperty("问题编号")
  private String questionNumber;

  /**
   * 超时时长
   */
  @ApiModelProperty("超时时长")
  private Double overTimeLength;

  /**
   * 是否超时 TRUE:是 FALSE:否
   */
  @ApiModelProperty("是否超时")
  private String isOvertime;

  /**
   * 父内容表主键ID
   */
  @ApiModelProperty("父内容表主键ID")
  private String parentEntityId;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    QuestionDto that = (QuestionDto) o;
    return (
      questionId == that.questionId &&
      questionIntroduce == that.questionIntroduce &&
      questionLevel == that.questionLevel &&
      questionStatus == that.questionStatus &&
      isPrivate == that.isPrivate &&
      actualSolveTime == that.actualSolveTime &&
      actualSolveCycle == that.actualSolveCycle &&
      sourceTypeCode == that.sourceTypeCode &&
      tableTypeCode == that.tableTypeCode &&
      entityId == that.entityId &&
      coordObjectTypeCode == that.coordObjectTypeCode &&
      coordObjectId == that.coordObjectId &&
      subjectLifeCycle == that.subjectLifeCycle &&
      initiatorInductionRecordId == that.initiatorInductionRecordId &&
      initiatorIdCardName == that.initiatorIdCardName &&
      initiatorNickName == that.initiatorNickName &&
      responsibleInductionRecordId == that.responsibleInductionRecordId &&
      relevantPeopleNum == that.relevantPeopleNum &&
      orderNumber == that.orderNumber &&
      operateTime == that.operateTime &&
      createTime == that.createTime &&
      taskNumber == that.taskNumber &&
      createInductionId == that.createInductionId &&
      questionNumber == that.questionNumber &&
      overTimeLength == that.overTimeLength &&
      isOvertime == that.isOvertime &&
      parentEntityId == that.parentEntityId
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(
      super.hashCode(),
      questionId,
      questionIntroduce,
      questionLevel,
      questionStatus,
      isPrivate,
      actualSolveTime,
      actualSolveCycle,
      sourceTypeCode,
      tableTypeCode,
      entityId,
      coordObjectTypeCode,
      coordObjectId,
      subjectLifeCycle,
      initiatorInductionRecordId,
      initiatorIdCardName,
      initiatorNickName,
      responsibleInductionRecordId,
      relevantPeopleNum,
      orderNumber,
      operateTime,
      createTime,
      taskNumber,
      createInductionId,
      questionNumber,
      overTimeLength,
      isOvertime,
      parentEntityId
    );
  }

}
